#include "imagegetimagerequest.h"
#include "imagegetimageresponse.h"

// Qt includes
#include <QUrl>

namespace Network {

GetImageRequest::GetImageRequest(const QString &imageUrl, QObject *parent)
    : Network::AbstractGetImageRequest(parent),
      m_response(new GetImageResponse(this)),
      m_imageUrl(imageUrl)
{

}

GetImageRequest::~GetImageRequest()
{
    delete m_response;
    m_response = 0;
}

const Network::Response &GetImageRequest::imageResponse() const
{
    return *m_response;
}

Network::Response &GetImageRequest::imageResponse()
{
    return *m_response;
}

QUrl GetImageRequest::url() const
{
    return QUrl(m_imageUrl);
}

} // namespace Network
